
<%@ page import="pojo.Student" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改学生信息</title>
    <style>
        table{
            width: 500px;
            border: 1px solid #100;
            border-collapse: collapse;

            margin: auto;
            margin-top: 250px;
        }
        td{
            border: 1px solid #100;
            padding: 3px;
            padding-left: 3px;
        }
        .left{
            text-align: right;
        }

        ._title{
            text-align: center;
            font-size: 25px;
            background-color: aliceblue;
        }
    </style>
</head>
<body>
<%
    // 获取学生对象
    Student stu = (Student) request.getAttribute("student");
%>
<form method="post" action="stu?action=modify_sava">
    <table>
        <tr>
            <td colspan="2" align="middle" class="_title">修改学生信息</td>
        </tr>

        <tr>
            <td class="left">姓名：</td>
            <td><input type="text" name="name" value="<%=stu.getName()%>"/></td>

        </tr>

        <tr>
            <td class="left" >学号：</td>
            <td><input type="text" name="stuNo" value="<%=stu.getStuNo()%>" readonly/></td>
        </tr>

        <tr>
            <td class="left">
                性别：
            </td>
            <td>
                <input type="radio" name="gender" value="男" <%=stu.getStuGender().equals("男")?"checked":""%>>男
                <input type="radio" name="gender" value="女" <%=stu.getStuGender().equals("女")?"checked":""%>>女
            </td>

        </tr>

        <tr>
            <td class="left">年级：</td>
            <td>
                <select name="grade">
                    <option value="大一" <%=stu.getStuGrade().equals("大一")?"select":""%>>大一</option>
                    <option value="大二" <%=stu.getStuGrade().equals("大二")?"select":""%>>大二</option>
                    <option value="大三" <%=stu.getStuGrade().equals("大三")?"select":""%>>大三</option>
                    <option value="大四" <%=stu.getStuGrade().equals("大四")?"select":""%>>大四</option>
                </select>
            </td>
        </tr>

        <tr>
            <td class="left">院系：</td>
            <td>
                <select name="depart">
                    <option value="计科院" <%=stu.getStuDepart().equals("计科院")?"select":""%>>计科院</option>
                    <option value="经管院" <%=stu.getStuDepart().equals("经管院")?"select":""%>>经管院</option>
                    <option value="电信院" <%=stu.getStuDepart().equals("电信院")?"select":""%>>电信院</option>
                </select>
            </td>
        </tr>

        <tr>
            <td class="left">专业：</td>
            <td><input type="text" name="major" value="<%=stu.getStuMajor()%>"/></td>
        </tr>

        <tr>
            <td class="left">班级：</td>
            <td><input type="text" name="class" value="<%=stu.getStuClass()%>"/></td>
        </tr>

        <tr>
            <td colspan="2" align="middle">
                <input type="submit" value="确定"/>
                <input type="reset" value="返回"/>
            </td>
        </tr>

    </table>
</form>
</body>
</html>